import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description:
 * User:Lenovo
 * Date:2024-12-12
 * Time:19:55
 */
public class Text {
    public static void main(String[] args) {
        Scanner san = new Scanner(System.in);
        String a = san.nextLine();
//        san.nextLine();
        String b = san.nextLine();
        char[] a1 = a.toCharArray();
        char[] b1 = b.toCharArray();
        char[] arr = new char[100];
        int count = 0;
        for (int i = 0; i < a1.length; i++) {
            int flag = 1;
            for (int j = 0; j < b1.length; j++) {
                if(a1[i]==b1[j]){
                    flag = 0;
                }
            }
            if(flag==1){
                arr[count] = a1[i];
                count++;
            }
        }
        int count2 = 0;
        while(arr[count2]!='\u0000'){
            count2++;
        }
        for (int i = 0; i < count2; i++) {
            System.out.print(arr[i]);
        }
    }
}
